package ch09.shili;

public class A {

    public static void a(){
        System.out.println("a begin");
        b();
        System.out.println("a end");
    }

    public static void b(){
        System.out.println("b begin");
        c();
        System.out.println("b end");
    }
    public static void c(){
        System.out.println("c begin");
        System.out.println(7/0);
        System.out.println("c end");
    }


    public static void main(String[] args) {
        System.out.println("main begin");
        try{
            a();
        }catch (Exception ex){
            System.out.println("发生异常了");
            ex.printStackTrace();//打印异常调用栈
        }

        System.out.println("main end");
    }
}
